home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
003
/
chrchpr4.arc
/
SCATTD.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
4KB
|
143 lines
* Program SCATTD - Prints Attendance Check Lists for 1 or all S.S. classes
? 'Dates of the Sundays for next month are: ',CURDATES
Accept 'Ok? ' to INS
Store '_____ _____ _____ _____ _____' to UDATES
Do while !(INS)<>'Y'
@ 18,0
@ 19,0
@ 20,0
@ 21,0
@ 22,0
@ 23,0
@ 24,0
@ 18,0 say ' Re-enter dates for Sundays of next month -'
@ 19,0 say ' '+UDATES
@ 20,2 GET CURDATES
READ
?
Accept 'Ok? ' to INS
ENDDO
STORE TRIM(CURDATES) TO curdates
If len(curdates) < 28
Store ' '+$(udates,1,23) to Udates
Store ' '+curdates to curdates
endif
Store '_________________________________________________' to ULINE
Select primary
Store d+':MSCROST' to mfile
Use &MFILE index &MFILE
Select secondary
Store T to invalid
Store ANAME1 to INS
If INS ='ALL'
Store 'SSSC=' to titltype
Store ins to insssc
Find &titltype
else
Store ins to insssc
Store 'SSSC='+INSSSC to titltype
Find &titltype
Store $(spact,6,4) to spactiv
SKIP
Store F to invalid
endif
If INS='ALL'
Do while $(spact,1,4)='SSSC' .and. .not. EOF
Store SPACTIV+$(SPACT,6,4) TO SPACTIV
SKIP
enddo
? 'ALL SSSC = ',spactiv
endif
Store len(spactiv)/4 to ssscleng
Store 0 to sssccntr
Store '$(ss:sc:memb,1,3)' to bname
Store ' Attendance Check List -- '+curmonth+', 19'+$(date(),7,2) to fline
Do while sssccntr<ssscleng
Select secondary
Store sssccntr*4+1 to SC1
Store $(spactiv,SC1,3) to INSSSC
Store 'SSSC='+INSSSC to titltype
Store INSSSC to bname1
Find &titltype
If #=0
Store 'No title for '+insssc+' in MDIRFILE' to schdr
else
Store trim($(spact,10,20))+fline to schdr
endif
Select primary
Set format to print
* Program SSATTD1 - Prints 1 S.S. Attendance Check List
Store 0 to PAGENUM
Store 61 to currline
Store INSSSC to SS:SC
Store len(INSSSC) to scleng
Store 0 to RECCOUNT
Store T to BADSC
Store T to BEGINNG
Find &INSSSC
If #=0
? 'No match for Small Church code = ',INSSSC,' in MEMBERS file. '
else
Set format to print
Store "$(SS:SC:MEMB,5,1)='*' .or. $(membstatus,2,1)='*'" to XSEL
Do while .not. EOF .and. ss:sc:memb = INSSSC
If .not. BEGINNG
IF CURRLINE > 60
If pagenum<>0
EJECT
ENDIF
@ 1,12 SAY SCHDR
STORE PAGENUM+1 TO PAGENUM
IF PAGENUM=1
@ 3,6 SAY "Please check the column under today's date and beside your name. "
@ 3,71 say 'Also, '
@ 4,6 say 'mark any recent change of address or phone number underneath your '
@ 4,72 say 'name.'
@ 5,6 say 'New people, please record your attendance on the last page.'
@ 8,0 say CURDATES
Store 10 to currline
else
@ 2,70 say 'PAGE'+STR(pagenum,3)
@ 4,1 say curdates
Store 6 to currline
endif
endif
Store trim(last:name)+', '+trim(first:name) to pname
If len(pname)>24
Store $(pname,1,24) to pname
endif
If $(ss:sc:memb,4,1)=chr(31)
@ curline,29 say '"'
endif
@ currline,30 say pname
@ currline,55 say 'H: '+home:phone
If work:phone<>' '
@ currline,68 say 'W: '+work:phone
endif
Store trim(address)+', '+trim(city:state)+' '+zip to xaddress
If len(xaddress)>48
Store $(xaddress,1,48) to xaddress
endif
@ currline+1,0 say udates
@ currline+1,30 say xaddress
@ currline+3,30 say uline
Store currline+4 to currline
SKIP
Do while .not. EOF .and. (* .or. &XSEL)
SKIP
enddo
endif
Store F to BEGINNG
enddo
EJECT
Set format to screen
* End of SSATTD1 program
Store SSSCCNTR+1 to SSSCCNTR
endif
enddo
Release udates,uline,invalid,insssc,titltype,spactiv,ssscleng,sssccntr,fline
Release sc1,bname1,schdr,pagenum,currline,ss:sc,scleng,reccount,badsc,beginng
Release xsel,pname,xaddress
Accept 'Report is complete. Press <RETURN> ' to XX
RETURN